<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.news.util.Pager"%>
<%@page import="com.news.bean.NewsType"%>
<%@page import="com.news.bean.News"%>
<%@page import="com.news.dao.impl.*" %>
<%
            String path = request.getContextPath();
            String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <base href="<%=basePath%>">

        <title>My JSP 'MyJsp10.jsp' starting page</title>

        <meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="cache-control" content="no-cache">
        <meta http-equiv="expires" content="0">
        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        <meta http-equiv="description" content="This is my page">
        <!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
        <script language="javascript">
            function send(){
                var keyword=document.getElementById("keyword").value;
                window.parent.main.location='../news?keyword='+keyword+'&cmd=listbykey';
            }
        </script>
    </head>

    <body>

        <img src="../HBLPro/images/display/blg.gif">
        <p>
            <b><font size="2" color="#336699">最 新 新 闻</font></b>
    <marquee direction="up" height="100px" onmouseout="this.start()" onmouseover="this.stop()" scrollAmount="1" scrollDelay="1">
        <%
             List<News> list = new NewsDaoImpl().list();
             if (list != null && list.size() > 0) {
                for (News news : list) {%>


        <span style="cursor:hand; border-bottom:#336699  solid 1px;" onclick="window.open('display/newstext.jsp?newsid=<%=news.getId()%>')">
            <font size="2" color="#336699"><%=news.getTitle()%></font></span><br>




        <% }
}
        %>
    </marquee>
    <p><p>
    <div id="sc">
        <form >
            <input type="text" value="" name="keyword" id="keyword" size="12" >
            <input type="button"  onclick="send()" value="搜 索">

        </form>
    </div>
</body>
</html>
